package com.lw.security.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Administrator
 * @version 1.0
 * @description:
 * @date 2022/3/28 21:22
 */
@RestController
@RequestMapping("/cate")
public class CateController {


    @PreAuthorize("hasAnyAuthority('cate:manager')")
    @GetMapping("/add")
    public String add(){
        return "cate add";
    }

    @PreAuthorize("hasAnyAuthority('cate:manager')")
    @GetMapping("/edit")
    public String edit(){
        return "cate edit";
    }
}
